package com.app.buss.ui;

import android.os.Bundle;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.app.buss.R;
import com.app.buss.adapter.TopAdapter;
import com.app.buss.base.BaseActivity;
import com.app.buss.bean.TopBean;
import com.app.buss.mvp.presenter.MainPresenter;
import com.app.buss.mvp.view.IMainView;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class Top20Activity extends BaseActivity<MainPresenter> implements IMainView {


    @BindView(R.id.rv_top20)
    RecyclerView rvTop20;

    private TopAdapter adapter;

    @Override
    protected MainPresenter createPresenter() {
        return new MainPresenter(this);
    }

    @Override
    protected int bindContent() {
        return R.layout.aty_top20;
    }

    @Override
    protected void initSome() {
        initToolBar("Top brokers");
        List<TopBean> list = new ArrayList<>();
        list.add(new TopBean(R.drawable.pic_1,"1:888","0.6 pips","55+"));
        list.add(new TopBean(R.drawable.pic_2,"1:1000","0 pips","57"));
        list.add(new TopBean(R.drawable.pic_3,"1:1000","0 pips","55+"));
        list.add(new TopBean(R.drawable.pic_4,"1:1000","0 pips","49"));
        list.add(new TopBean(R.drawable.pic_5,"1:400","0.9 pips","64"));
        list.add(new TopBean(R.drawable.pic_6,"1:3000","0 pips","35+"));
        list.add(new TopBean(R.drawable.pic_7,"1:400","0.6 pips","60"));
        list.add(new TopBean(R.drawable.pic_8,"1:500","0 pips","53"));
        list.add(new TopBean(R.drawable.pic_9,"1:500","0.4 pips","60+"));
        list.add(new TopBean(R.drawable.pic_10,"1:500","0 pips","40+"));
        list.add(new TopBean(R.drawable.pic_11,"1:200","0.1 pips","38"));
        list.add(new TopBean(R.drawable.pic_12,"--","0.25 pips","10"));
        list.add(new TopBean(R.drawable.pic_13,"1:400","0 pips","40+"));
        list.add(new TopBean(R.drawable.pic_14,"--","1.4 pips","80+"));
        list.add(new TopBean(R.drawable.pic_15,"1:500","0 pips","61+"));
        list.add(new TopBean(R.drawable.pic_16,"1:1000","0 pips","188"));
        list.add(new TopBean(R.drawable.pic_17,"1:2000","0 pips","40+"));
        list.add(new TopBean(R.drawable.pic_18,"1:500","0.2 pips","76"));
        list.add(new TopBean(R.drawable.pic_19,"1:500","0.1 pips","49"));
        list.add(new TopBean(R.drawable.pic_20,"1:500","0 pips","28"));
        adapter = new TopAdapter(list,getApplicationContext());
        rvTop20.setLayoutManager(new LinearLayoutManager(this));
        rvTop20.setAdapter(adapter);
    }

    @Override
    public void getDataSuccess(Object model) {
    }

    @Override
    public void getDataFail(String msg) {
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }
}
